Houdini 13.0

VEX is a high-performance expression language used in many places in Houdini. VEX evaluation is typically very efficient giving performance close to compiled C/C++ code. VEX is not an alternative to scripting, but rather a smaller, more efficient general purpose language for writing shaders and custom nodes.

VEX is loosely based on the C language, but takes ideas from C++ as well as the RenderMan shading language.

VEX is used in several places in Houdini:

  • Rendering – mantra uses VEX for all shading computation. This includes light, surface, displacement and fog shaders.

  • compositing – The VEX Generator and VEX Filter COPs allows you to write complex custom COPs in VEX. The expressions evaluate very close to C/C++ speeds and run 1000’s of times faster than the Pixel Expression COP.

  • Particles – The VEX POP allows you to do almost anything that POPs can do themselves. It is possible to write one single VEX function which performs the task of many POPs. Because the VEX code is localized to one single operator, the VEX code will typically run faster than a network of POPs.

  • Modeling – The VEX SOP allows you to write a custom surface node that manipulates point attributes. This can move points around, adjust velocities, change colors. As well, you can group points or do many other useful tasks. VEX SOPs typically run 10 or more times faster than a point SOP.

  • CHOPs – The VEX CHOP lets you to custom CHOPs. The CHOP functions can manipulate arbitrary numbers of input channels and process channel data in arbitrary ways. In some cases, the VEX code can run faster than compiled C++ code.

  • Fur – Procedural fur behavior is implemented with VEX.